using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._StandardFeatureAnalysisTools._AnalyzePatterns
{
    /// <summary>
    /// <para>Interpolate Points</para>
    /// <para>Predicts values at new locations based on measurements from a collection of points. The tool uses point data with values at each point as input and makes areas classified by predicted values.</para>
    /// <para>根据点集合的测量值预测新位置的值。该工具使用具有每个点值的点数据作为输入，并按预测值对区域进行分类。</para>
    /// </summary>    
    [DisplayName("Interpolate Points")]
    public class InterpolatePoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public InterpolatePoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputLayer">
        /// <para>Input Features</para>
        /// <para>The point features that will be interpolated to a continuous surface layer.</para>
        /// <para>将插值到连续曲面图层的点要素。</para>
        /// </param>
        /// <param name="_outputName">
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// </param>
        public InterpolatePoints(object _inputLayer, object _outputName)
        {
            this._inputLayer = _inputLayer;
            this._outputName = _outputName;
        }
        public override string ToolboxName => "Standard Feature Analysis Tools";

        public override string ToolName => "Interpolate Points";

        public override string CallName => "sfa.InterpolatePoints";

        public override List<string> AcceptEnvironments => ["extent"];

        public override object[] ParameterInfo => [_inputLayer, _outputName, _field, _interpolateOption.GetGPValue(), _outputPredictionError.GetGPValue(), _classificationType.GetGPValue(), _numClasses, _classBreaks, _boundingPolygonLayer, _predictAtPointLayer, _outputLayer, _outputPredictionErrorLayer, _outputPredictedPointsLayer];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The point features that will be interpolated to a continuous surface layer.</para>
        /// <para>将插值到连续曲面图层的点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputLayer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputName { get; set; }


        /// <summary>
        /// <para>Interpolation Field</para>
        /// <para>The numeric field containing the values you want to interpolate.</para>
        /// <para>包含要插值的值的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolation Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field { get; set; } = null;


        /// <summary>
        /// <para>Interpolate Option</para>
        /// <para><xdoc>
        ///   <para>Controls your preference for speed versus accuracy, from fastest to most accurate. More accurate predictions take longer to calculate.</para>
        ///   <bulletList>
        ///     <bullet_item>Speed—Speed.</bullet_item><para/>
        ///     <bullet_item>Balanced—Balanced. This is the default.</bullet_item><para/>
        ///     <bullet_item>Accuracy—Accuracy.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>控制您对速度与准确性的偏好，从最快到最准确。更准确的预测需要更长的时间来计算。</para>
        ///   <bulletList>
        ///     <bullet_item>速度 - 速度。</bullet_item><para/>
        ///     <bullet_item>平衡 （Balanced） - 平衡。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>准确性 - 准确性。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolate Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _interpolateOption_value _interpolateOption { get; set; } = _interpolateOption_value._5;

        public enum _interpolateOption_value
        {
            /// <summary>
            /// <para>Speed</para>
            /// <para>Speed—Speed.</para>
            /// <para>速度 - 速度。</para>
            /// </summary>
            [Description("Speed")]
            [GPEnumValue("1")]
            _1,

            /// <summary>
            /// <para>Balanced</para>
            /// <para>Balanced—Balanced. This is the default.</para>
            /// <para>平衡 （Balanced） - 平衡。这是默认设置。</para>
            /// </summary>
            [Description("Balanced")]
            [GPEnumValue("5")]
            _5,

            /// <summary>
            /// <para>Accuracy</para>
            /// <para>Accuracy—Accuracy.</para>
            /// <para>准确性 - 准确性。</para>
            /// </summary>
            [Description("Accuracy")]
            [GPEnumValue("9")]
            _9,

        }

        /// <summary>
        /// <para>Output prediction error</para>
        /// <para><xdoc>
        ///   <para>If checked, a polygon layer of standard errors for the interpolation predictions will be output.</para>
        ///   <para>Standard errors are useful because they provide information about the reliability of the predicted values. A simple rule of thumb is that the true value will fall within two standard errors of the predicted value 95 percent of the time. For example, suppose a new location gets a predicted value of 50 with a standard error of 5. This means that this task's best guess is that the true value at that location is 50, but it reasonably could be as low as 40 or as high as 60. To calculate this range of reasonable values, multiply the standard error by 2, add this value to the predicted value to get the upper end of the range, and subtract it from the predicted value to get the lower end of the range.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Unchecked—Do not create a prediction error output layer. This is the default.</bullet_item><para/>
        ///       <bullet_item>Checked—Create a prediction error output layer.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>如果选中，将输出插值预测的标准误差的多边形图层。</para>
        ///   <para>标准误差很有用，因为它们提供了有关预测值可靠性的信息。一个简单的经验法则是，在95%的时间内，真实值将落在预测值的两个标准误差内。例如，假设新位置的预测值为 50，标准误差为 5。这意味着此任务的最佳猜测是该位置的真实值为 50，但合理地可能低至 40 或高至 60。要计算此合理值范围，请将标准误差乘以 2，将此值与预测值相加得到范围的上限，然后从预测值中减去它得到范围的下限。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>未选中 - 不创建预测误差输出图层。这是默认设置。</bullet_item><para/>
        ///       <bullet_item>选中 - 创建预测误差输出图层。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output prediction error")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _outputPredictionError_value _outputPredictionError { get; set; } = _outputPredictionError_value._false;

        public enum _outputPredictionError_value
        {
            /// <summary>
            /// <para>OUTPUT_ERROR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("OUTPUT_ERROR")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ERROR</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ERROR")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Classification Type</para>
        /// <para><xdoc>
        ///   <para>Determines how predicted values will be classified into polygons.</para>
        ///   <bulletList>
        ///     <bullet_item>Equal interval— Polygons are created such that the range of density values is equal for each area.</bullet_item><para/>
        ///     <bullet_item>Geometric interval— Polygons are based on class intervals that have a geometric series. This method ensures that each class range has approximately the same number of values within each class and that the change between intervals is consistent. This is the default.</bullet_item><para/>
        ///     <bullet_item>Equal area— Polygons are created such that the size of each area is equal. For example, if the result has more high-density values than low-density values, more polygons will be created for high densities.</bullet_item><para/>
        ///     <bullet_item>Enter class breaks manually—You define your own range of values for areas. These values will be entered as class breaks.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定如何将预测值分类到多边形中。</para>
        ///   <bulletList>
        ///     <bullet_item>相等间隔 - 创建多边形，使每个区域的密度值范围相等。</bullet_item><para/>
        ///     <bullet_item>几何区间 - 多边形基于具有几何序列的类区间。此方法可确保每个类范围在每个类中具有大致相同的值数，并且间隔之间的更改是一致的。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>相等面积 - 创建多边形时，每个区域的大小相等。例如，如果结果的高密度值多于低密度值，则将为高密度创建更多多边形。</bullet_item><para/>
        ///     <bullet_item>手动输入课时间隔 - 您可以定义自己的区域值范围。这些值将作为分班符输入。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Classification Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _classificationType_value _classificationType { get; set; } = _classificationType_value._GEOMETRICINTERVAL;

        public enum _classificationType_value
        {
            /// <summary>
            /// <para>Equal area</para>
            /// <para>Equal area— Polygons are created such that the size of each area is equal. For example, if the result has more high-density values than low-density values, more polygons will be created for high densities.</para>
            /// <para>相等面积 - 创建多边形时，每个区域的大小相等。例如，如果结果的高密度值多于低密度值，则将为高密度创建更多多边形。</para>
            /// </summary>
            [Description("Equal area")]
            [GPEnumValue("EQUALAREA")]
            _EQUALAREA,

            /// <summary>
            /// <para>Equal interval</para>
            /// <para>Equal interval— Polygons are created such that the range of density values is equal for each area.</para>
            /// <para>相等间隔 - 创建多边形，使每个区域的密度值范围相等。</para>
            /// </summary>
            [Description("Equal interval")]
            [GPEnumValue("EQUALINTERVAL")]
            _EQUALINTERVAL,

            /// <summary>
            /// <para>Geometric interval</para>
            /// <para>Geometric interval— Polygons are based on class intervals that have a geometric series. This method ensures that each class range has approximately the same number of values within each class and that the change between intervals is consistent. This is the default.</para>
            /// <para>几何区间 - 多边形基于具有几何序列的类区间。此方法可确保每个类范围在每个类中具有大致相同的值数，并且间隔之间的更改是一致的。这是默认设置。</para>
            /// </summary>
            [Description("Geometric interval")]
            [GPEnumValue("GEOMETRICINTERVAL")]
            _GEOMETRICINTERVAL,

            /// <summary>
            /// <para>Enter class breaks manually</para>
            /// <para>Enter class breaks manually—You define your own range of values for areas. These values will be entered as class breaks.</para>
            /// <para>手动输入课时间隔 - 您可以定义自己的区域值范围。这些值将作为分班符输入。</para>
            /// </summary>
            [Description("Enter class breaks manually")]
            [GPEnumValue("MANUAL")]
            _MANUAL,

        }

        /// <summary>
        /// <para>Number of Classes</para>
        /// <para><xdoc>
        ///   <para>This value is used to divide the range of predicted values into distinct classes. The range of values in each class is determined by the classification type. Each class defines the boundaries of the result polygons.</para>
        ///   <para>The default is 10 and the maximum is 32.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>此值用于将预测值的范围划分为不同的类。每个类中的值范围由分类类型确定。每个类定义结果多边形的边界。</para>
        ///   <para>默认值为 10，最大值为 32。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Classes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _numClasses { get; set; } = 10;


        /// <summary>
        /// <para>Class Breaks</para>
        /// <para>To do a manual classification, supply the desired class break values. These values define the upper limit of each class, so the number of classes will equal the number of entered values. Areas will not be created for any locations with predicted values above the largest entered break value. You must enter at least 2 values and no more than 32.</para>
        /// <para>若要进行手动分类，请提供所需的分类间隔值。这些值定义了每个类的上限，因此类的数量将等于输入的值的数量。不会为预测值高于输入的最大中断值的任何位置创建区域。您必须输入至少 2 个值且不超过 32 个。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Class Breaks")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _classBreaks { get; set; } = null;


        /// <summary>
        /// <para>Bounding Polygons</para>
        /// <para>A layer specifying the polygons where you want values to be interpolated. For example, if you are interpolating densities of fish within a lake, you can use the boundary of the lake in this parameter and the output will only contain polygons within the boundary of the lake.</para>
        /// <para>指定要在其中插值的面的图层。例如，如果要插值湖内鱼类的密度，则可以在此参数中使用湖的边界，并且输出将仅包含湖边界内的面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bounding Polygons")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _boundingPolygonLayer { get; set; } = null;


        /// <summary>
        /// <para>Predict At Point Layer</para>
        /// <para>An optional layer specifying point locations to calculate prediction values. This allows you to make predictions at specific locations of interest. For example, if the input layer represents measurements of pollution levels, you can use this parameter to predict the pollution levels of locations with large at-risk populations, such as schools or hospitals. You can then use this information to give recommendations to health officials in those locations.</para>
        /// <para>指定用于计算预测值的点位置的可选图层。这允许您在感兴趣的特定位置进行预测。例如，如果输入图层表示污染水平的测量值，则可以使用此参数来预测高危人群（如学校或医院）的污染水平。然后，您可以使用此信息向这些地点的卫生官员提供建议。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Predict At Point Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _predictAtPointLayer { get; set; } = null;


        /// <summary>
        /// <para>Output Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputLayer { get; set; }


        /// <summary>
        /// <para>Output Prediction Error Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Prediction Error Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputPredictionErrorLayer { get; set; }


        /// <summary>
        /// <para>Output Predicted Points Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Predicted Points Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputPredictedPointsLayer { get; set; }


        public InterpolatePoints SetEnv(object extent = null)
        {
            base.SetEnv(extent: extent);
            return this;
        }

    }

}